import 'package:flutter/material.dart';
import 'package:flutter_getx_template_v3/generated/assets.dart';
import 'package:get/get.dart';
import 'login_logic.dart';

class LoginPage extends GetView<LoginLogic> {
  const LoginPage({Key? key}) : super(key: key);

  @override
  Widget build(BuildContext context) {
    return SafeArea(
        child: Scaffold(
      body: Container(
        width: double.infinity,
        height: double.infinity,
        decoration: const BoxDecoration(
            image: DecorationImage(
                image: AssetImage(Assets.imagesLoginBg), fit: BoxFit.cover)),
        child: Center(
          child: ElevatedButton(
              onPressed: () {
                controller.login();
              },
              child: Text("登录".tr)),
        ),
      ),
    ));
  }
}
